package com.pioneer.web.sale.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.pioneer.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * SalOrder 销售订单表
 *
 * @author hlm
 * @date 2025-04-30 15:08:43
 */
@EqualsAndHashCode(callSuper = true)
@TableName(value = "sal_order")
@Data
public class SalOrder extends BaseEntity {

    /**
     * 销售订单ID
     */
    @TableId(type = IdType.AUTO)
    private Long orderId;

    /**
     * 订单编号
     */
    private String orderCode;

    /**
     * 订单名称
     */
    private String orderName;

    /**
     * 来源单据ID
     */
    private Long sourceId;

    /**
     * 订单总金额
     */
    private BigDecimal total;

    /**
     * 审批状态
     */
    private String approveStatus;

    /**
     * 审批人
     */
    private String approver;

    /**
     * 审批时间
     */
    private LocalDateTime approveTime;

    /**
     * 审批意见
     */
    private String approveOpinion;

    /**
     * 审批结果
     */
    @TableField(exist = false)
    private String approveResult;

    /**
     * 销售订单子表集合
     */
    @TableField(exist = false)
    private List<SalOrderBody> orderBodyList;
}
